package com.bootdo.collection.domain;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

public class PictureDO{
    //主键
    private int pictureId;
    //图片访问路径
    private String pictureUrl;
    //图片所属套图
    private PictureSetDO pictureSetDO;
    //套图id
    private Integer pictureSetId;

    public Integer getPictureSetId() {
        return pictureSetId;
    }

    public void setPictureSetId(Integer pictureSetId) {
        this.pictureSetId = pictureSetId;
    }

    public int getPictureId() {
        return pictureId;
    }

    public void setPictureId(int pictureId) {
        this.pictureId = pictureId;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public PictureSetDO getPictureSetDO() {
        return pictureSetDO;
    }

    public void setPictureSetDO(PictureSetDO pictureSetDO) {
        this.pictureSetDO = pictureSetDO;
    }
    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    @Override
    public boolean equals(Object obj) {
        if(this ==obj){//如果是引用同一个实例
            return true;
        } if (obj!=null && obj instanceof PictureDO) {
            PictureDO p = (PictureDO) obj;
            return this.pictureId==p.pictureId;
        }else{
            return false;
        }
    }

}
